-- CALC_BISHOP_MAGIC

-- 计算主教魔力
return function(bishop)
    local magic;

    local dungeonId = DungeonM.getDungeonId();
    if dungeonId == 20023 then
        magic = 25;
    elseif dungeonId == 20022 then
        magic = 20;
    else
        magic = 15;
    end

    -- 1. 绝对值加成
    local prop = PropM.combine(bishop, "attrib2", "magic");
    magic = PropM.apply(prop, magic);

    -- 2. 百分比加成
    prop = PropM.combine(bishop, "attrib", "magic");
    magic = PropM.apply(prop, magic);

    return magic;
end
